
interface Person<T> {
	public void setAge(T age);
	public T getAge();
}


class Student<T>    implements Person<T> {
	T age;
	public void setAge(T age) {
		this.age = age;
	}
	
	public T getAge(){
		return this.age;
	}
}

class Student2 implements Person<String> {
	String age;
	public void setAge(String age) {
		this.age = age;
	}
	
	public String getAge(){
		return this.age;
	}

}


public class Generics {
	public static void main(String args[]) {
		Student<String> stu = new Student<String>();
		stu.setAge("12 years old");
		printInfo(stu);
		
		Student2 stu2 = new Student2();
		stu2.setAge("11 years old");
		printInfo(stu2);		
		
	}

	public static void printInfo(Person<? super String> p) {
		System.out.println(p.getAge());
	}

	public static <T> void printInfo2(Person<T> p) {
		System.out.println(p.getAge());
	}


	
}








